export class dataConfig {
    private constructor() { };
    private static m_pInstance: dataConfig = null;
    public static getInstance() {
        if (!this.m_pInstance) {
            this.m_pInstance = new dataConfig();
        }
        return this.m_pInstance;
    }
    private state = { ON: 'on', OFF: 'off' };

    public SelfData: any = null;
    public isHaveTransPass: boolean = null;
    public isDeveloperMode: boolean = false;
    public isOpenedSafeBank: boolean = false;


    //-----------
    //用户
    public readonly CHOOSE_FRIEND_MODEL = { single: 0, multi: 1 };
    public readonly NAME_DEFAULT_LENGTH: number = 5;
    public readonly URL_ADD_PARAM_CONNECT_CHAR: string = '?';
    public readonly URL_BETWEEN_PARAM_CONNECT_CHAR: string = '&';
    public readonly DEVELOPER_CODE: string = 'ddvip';
    public readonly AGENT_DATA_KEY: string = 'AGENT_DATA_KEY';
    //钱包
    public readonly TRANS_PASS_SET_TRASS_PASS_TITLE: string = '为了您的账户安全, 请先设置支付密码';
    public readonly TRANS_PASS_INPUT_TRASS_PASS_AGAIN_TITLE: string = '请再次输入以确认';
    public readonly TRANS_PASS_VERIFY_TITLE: string = '请输入支付密码, 以验证身份';
    public readonly CHONG_ZHI_JIN_E_XUAN_ZE_ARR: string[] = ['100', '200', '300', '500', '1000', '2000', '3000', '5000'];
    //封印币记录映射
    public readonly SEAL_LOG_TYPE_STR = {

    };

    public readonly ZHANG_DAN_GOLD_TYPE = {
        register: '注册',
        game: '游戏(战绩变动)',
        bank: '保险箱',
        agent: '代理佣金提现',
        manual_deposit: '人工存款',
        manual_withdraw: '人工提款',
        member_withdraw: '会员提款',
        transfer_expend: '转账支出',
        transfer_income: '转账到余额',
        send_red_packet: '发红包',
        get_red_packet: '红包到余额',
        return_red_packet: "红包回退",
        bill_expend: '账单支出',
        bill_income: '账单收入',
        server_cost: '服务费收入',
        buy_diamond_mall: '商城购买联盟币',
        thirdpay_recharge: '第三方支付充值',
        thirdpay_recharge_manual: '第三方支付充值补单',
        thirdpay_withdraw: '第三方支付提现',
        thirdpay_withdraw_manual: '第三方支付提现补单',
        group_member_expansion: "群成员扩充",
        club_table_expansion: "俱乐部桌子扩充",
        recharge_turn_table: "充值转盘",
        seal_coin_turn_table: "封印币转盘",
        unseal_seal_coin: "封印币解封",
    };
    public readonly ZHANG_DAN_DIAMOND_TYPE = {
        register: '注册',
        game: '游戏',
        diamond_deposit: '充值',
        diamond_withdraw: '扣除',
        create_table: '创建桌子',
        buy_diamond_mall: '商城购买联盟币',
        agentsale_sale: '代销售出',
        agentsale_buy: '代销买入',
        recharge_turn_table: "充值转盘",
        seal_coin_turn_table: "封印币转盘",

    };
    public readonly CHONG_ZHI_TYPE = {
        ALIPAY: 0,    // 支付宝
        BANKCARD: 1,   // 银行卡
        WECHATPAY: 2,   // 微信
        QQPAY: 3,   // QQ
        JDPAY: 4,   // 京东
        UNIPAY: 5,   // 银联
        MEITUAN: 6,   // 美团
        WECHATTM: 7,   // 微信条码
        ALIPAYQR: 8,   // 支付宝扫码
        WECHATPAYQR: 9,   // 微信扫码
        QQPAYQR: 10,   // QQ扫码
        JDPAYQR: 11,   // 京东扫码
        UNIPAYQR: 12,   // 银联扫码
    };
    public readonly TI_XIAN_TYPE = {
        MANUAL: 'MANUAL',
        THIRD: 'THIRD',
    };
    public readonly TI_XIAN_ACCOUNT_TYPE = {
        BANKCARD: 'BANKCARD',
        ALIPAY: 'ALIPAY',
    };
    public readonly PAY_TYPE = { bank: 0, aliPay: 1 };
    public readonly RechargeTypeEnum = { ALIPAY: "ALIPAY", BANKCARD: "BANKCARD", WECHATPAY: "WECHATPAY", QQPAY: "QQPAY", JDPAY: "JDPAY", UNIPAY: "UNIPAY", MEITUAN: "MEITUAN", WECHATTM: "WECHATTM" };
    //设置
    public readonly RECEIVE_NEW_MESSAGE_KEY = 'RECEIVE_NEW_MESSAGE_KEY';
    public readonly VOICE_VIBRATION_KEY = 'VOICE_VIBRATION_KEY';
    public readonly RECEIVE_NEW_MESSAGE_STATE = this.state;
    public readonly VOICE_STATE = this.state;
    public readonly VIBRATION_STATE = this.state;

    //-----------
    //通讯录
    public readonly defaultGroup: string = '#';//默认分组
    public readonly TONG_XUN_LU_KEY: string = 'TONG_XUN_LU_KEY';
    public readonly GROUP_DATA_KEY: string = 'GROUP_DATA_KEY';
    public readonly GenderArr = ['未知', '男', '女'];
    public readonly FROM_TYPE = { Addr_List: '手机联系人', Group: '群', Invalid: '未知', Invite: '邀请', Search_Phone: '手机号搜索', QrCode: '二维码', Search_Group: '搜索群号', Share: '分享', WeChat: '微信', Self: '自己' };
    //群
    public readonly GROUP_DO_TYPE = { QUIT: '退出', DISSOLVE: '解散' };
    public readonly GROUP_DEFAULT_NAME = '群聊';
    public readonly PROTECT_MODEL = this.state;
    public readonly GROUP_TYPE = { Group: 0, Club: 1 };

    //-----------
    //个人中心
    public readonly DW: string[] = ['', '万', '亿', '万亿', '兆', '万兆', '亿兆', '富可敌国'];
    public readonly SERVER_COMMON_QUESTION_LIST = [
        '支付宝充值提示额度已满怎么办?',
        '如何开通代理?',
        '银行卡充值注意事项',
        '代理收益计算'
    ];
    public readonly SERVER_COMMON_ANSWER_LIST = [
        //     `添加支付宝好友, 备注注册时光的手机号码, 通过后收到时光通知即可完成认证`,

        `支付宝额度满后, 请在个人中心=>客服找银行卡充值客服为您充值\r也可以找管理和群主为您充值`,

        `请在在线客服里联系商务合作, 提交你要代理的游戏`,

        `   1.请通过个人中心=>在线客服选择银行卡充值客服\r
    2.充值的银行卡会经常变动, 每次充值前请在客服会化界面确认\r
    3.银行卡转账请不要转账整数, 可以随机带个尾数1~9。比如502, 403等方便客服查账\r
    4.请在转账到账后提供转账凭证给客服(到账前发截图没用)\r
    5.银行卡充值客服繁忙时候请耐心等候, 不要刷屏。`,

        `代理规则：\r
    1.代理推广为无限级代理\r
    2.代理可以分为“普通代理”和“大区代理”，普通代理最多可以分得下五级的服务费，大区代理可以额外获得最多40级大区收益（大区收益见后续说明）\r
\n如何成为代理：\r
    1.若您有上级代理，可以找您的上级代理给您开通\r
    2.若无上级代理，则可以在游戏中填写资料申请成为代理\r
\n如何推广下级：\r
    1.成为代理后，每个代理的个人名片二维码将带有代理的信息，通过扫描二维码新注册的玩家将默认成为其下级玩家\r
    2.代理推广的下级也可以被开通成为代理，拥有推广权限\r
\n如何获得代理收益：\r
    1.作为代理，您最多将可以获得您推广的下五级玩家的服务费\r
    2.举例：假设A推广B、B推广C、C推广D、D推广E、E推广F、F推广G；\r
        a.F玩家玩游戏抽取的服务费，E、D、C、B、A五级可以分得；\r
        b.G玩家玩游戏抽取的服务费，F、E、D、C、B五级可以分得，A作为第六级将不可分得\r
    3.代理收益计算方式：假如有10000服务费分给代理\r
        a.1级获得=10000*40%\r
        b.2级获得=1级获得*10%\r
        c.3级获得=2级获得*10%+1级获得*6%\r
        d.4级获得=3级获得*10%+2级获得*6%+1级获得*5%\r
        e.5级获得=4级获得*10%+3级获得*6%+2级获得*5%+1级获得*4%\r
    4.说明：\r
        a.当代理玩游戏时首先作为1级分得服务费\r
        b.上述比例根据实际情况而定\r
\n大区代理及大区收益：\r
    1.成为大区：一级代理可以申请成为大区代理，大区代理可以将其直属下级代理开通成为大区代理；并且可以将自己获得收益的比例分配给其直属下级\r
    2.大区收益：成为大区代理后可以额外获得其推广的所有下级（限40级）的代理收益的总和*百分比（百分比默认为90%）\r
    3.大区收益计算：A推广B、B推广C、C推广D、D推广E、E推广F、F推广G；假如ABCDEFG每个人的代理收益为100，则A所有下级的代理收益总和为700，B的为600；A可以额外获得大区收益为700*90%=630；若A分30%给B，则A可以额外获得700*90%-600*30%=450，B可以额外获得600*30%=180，以此类推\r
`
    ];
    public readonly SERVICE_TYPE = { bank: 2, zhaoShang: 3, aliPay: 4, game: 5 };
    public readonly SERVICE_NAME = { "2": "银行卡充值", "3": "全国招商(城市合伙人咨询)", "4": "提现客服", "5": "客服(游戏问题找我)", };

    //-----------
    //日期
    public readonly monthSX = { Jan: '01', Feb: '02', Mar: '03', Apr: '04', May: '05', Jun: '06', Jul: '07', Aug: '08', Sep: '09', Oct: '10', Nov: '11', Dec: '12' };
    public readonly TIME_TYPE = { THREE_DAYS_AGO: 1, NEARLY_THREE_DAYS: 0 };//0:'近三天' 1:'三天前'

    //-----------
    //资源
    // 加载远端图片最多重试次数
    public readonly MAX_LOAD_SPRITE_TIME = 3;


    //DWC
    // 头像源路径
    public readonly HEAD_ORIGIN_PATH = "Common/HeadIcon/head_";
    public readonly MIN_HEAD_ID = 0;
    public readonly MAX_HEAD_ID = 18;
    /** 小于等于的时候为女，大于的时候为男 */
    public readonly SEX_DIF_HEAD_ID = 9;
}
export enum SERVICE_TYPE {
    bank = 2,
    zhaoShang,
    aliPay,
    game,
}
export enum SERVER_COMMON_QUESTION_ID {
    // RZZFB,
    EDYM,
    KTDL,
    YHKCZ,
    RHCWDL
};
export enum VIP_STATUS {
    UNSEAL,
    USING,
    SEALING,
    SEALED
}